package AdapterPattern;

public class AudioPlayer implements MediaPlayer{
    MediaAdapter adapter;

    public void play(String type, String fileName) {
        if(type.equals("mp3")){
            System.out.println("play mp3 : "+fileName);
        }else if(type.equals("mp4")||type.equals("vlc")){
            adapter = new MediaAdapter(type);
            adapter.play(type, fileName);
        }else{
            System.out.println( type + " not supported");
        }
    }
}
